<?php
/**
 * Created by PhpStorm.
 * User: zhuzhuzhu
 * Date: 2016/9/28
 * Time: 19:11
 */header('Content-type:text/html;charset=utf-8');
?>
<html>
<head>
 <title>判断是不是为闰年</title>
 <style>
  table{background-color:cornflowerblue; border: none;align-content: center; width: 600px;}
  tr{width: 600px;height: 50px;}
  td{width: 300px;height: 50px;}
 </style>
</head>
<body>
<?php
 $year=2015;
$result=(($year%4==0) && ($year%100!=0) || ($year%400==0))?'是闰年':'不是闰年';
 $str="<table>";
$str.="<tr><td colspan='3'><h2 align='center'>闰年的判断</h2> </td></tr>";
$str.="<tr><td>输入的年份：</td><td align='left'><input type='text' value='$year'></td></tr> ";
$str.="<tr><td>判断地结果：</td><td align='left'>$year ".'年'."$result</td></tr>";
echo $str;
?>
</body>
</html>
